x86: Detect shadow-emulate write to stack from inside the write
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 22 Feb 2007 15:22:16 +0000 (15:22 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 22 Feb 2007 15:22:16 +0000 (15:22 +0000)
commit92eb4bd779250e470191a0d36f4a310134fb76c8
treeaad0e5f4401dae77be73a4db19997ec47529fb7e
parent1df42b817ab03ec2407d04b3f3d876dfb5a1b39b
x86: Detect shadow-emulate write to stack from inside the write
handler, where we can quite conveniently check whether the access
segment is SS. This will only give a false positive for non-stack
writes that override the destination segment to SS, which it is
probably safe to assume will never happen when the destination is a
legitimate page table!

For now, instead of bailing and unshadowing just increment a perfctr
and we'll see if that increases fast under any reasonable workload.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c
xen/include/asm-x86/perfc_defn.h